<?php 
error_reporting(0);
$isadmin=1; 
include '../comm/config.php';
include '../comm/checkpostandget.php';
include 'check.php';
$tao_status=include('../comm/tao_status.php');
$id=$_GET['id']; 
$sql="select * from ".$BIAOTOU."tradelist where id=".$id;
$rs = mysql_query($sql);

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
.STYLE2 {
	color: #555555;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
-->
</style>
</head>

<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="images/arrow.gif" width="16" height="22" align="absmiddle" /> 返现交易信息</strong></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><form id="form1" name="form1" method="post" action="savefanxian.php">
<br />
<table width="720"  align="center" border=1 cellpadding=0 cellspacing=0
style="border-collapse: collapse" bordercolor="#dddddd">
                      
					  <?php
					  while ($row = mysql_fetch_array($rs))
					{?>
                      <tr>
                        <td width="143" height="30" align="right" class="bigtext">淘宝交易号：                        </td>
                        <td width="577" height="30" class="bigtext">&nbsp;<?php echo $row["trade_id"]; ?></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">商品名称：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["item_title"]; ?></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">单价：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["pay_price"]; ?></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">数量：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["item_num"]; ?></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">佣金：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["commission"]; ?></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">佣金比率：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["commission_rate"]; ?></td>
                      </tr>
					  <tr>
                        <td height="30" align="right" class="bigtext">交易时间：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $row["pay_time"]; ?></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">订单状态：</td>
                        <td height="30" class="bigtext">&nbsp;<?php echo $tao_status[$row["checked"]]; ?></td>
                      </tr>
                        <?php
						$ddjt=$row['ddjt']; 
						if($ddjt!=''){
						?>
					  <tr>
                        <td height="30" align="right" class="bigtext">订单截图：</td>
                        <td height="30" class="bigtext">&nbsp;<img style="width:417px; height:100px" src="../upload/ddjt/<?=$row["ddjt"];?>" /></td>
                      </tr>
					  <? }?>
					  <tr>
                        <td height="30" align="right" class="bigtext">交易人用户名：</td>
                        <td height="30" class="bigtext">&nbsp;<?php
						if($row["outer_code"]!=""){
							$sql="select ddusername from ".$BIAOTOU."user where Id=".$row["outer_code"]."";
							$rs2 = mysql_query($sql);
							while ($row2 = mysql_fetch_array($rs2))
							{
								$jyuser=$row2["ddusername"]; }
							}						
						 ?><input name="tradeuser" type="text" id="tradeuser" value="<?php echo $jyuser;?>"/> 会员id：<?=$row["outer_code"]?></td>
                      </tr>
					   <tr>
                        <td height="47" align="center" class="bigtext">&nbsp;</td>
                        <td height="47" class="bigtext"><input type="hidden" name="id" value="<?php echo $row["Id"]; ?>" />
                          &nbsp;<input type="submit" name="Submit" value=" 确定返现？" <?php if ($row["outer_code"]!="" && $jyuser!='' && $row["checked"]==2)  {echo"disabled=disabled";}?> /></td>
					   </tr><?php }?>
                    </table>
                                    </form>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
</body>
</html>
<?php mysql_close($link);?>
